<!--{eval $_TPL['titles'] = array(getstr($pic['title'], 60, 0, 0, 0, 0, -1), $album['albumname'], '相册');}-->
<!--{template header}-->

<!--{if $space[self]}-->
<div class="searchbar">
<form method="get" action="network.php">
	<input name="key" value="" size="26" class="t_input" type="text">
	<input name="searchsubmit" value="搜索相册" class="submit" type="submit">
	<input type="hidden" name="searchmode" value="1" />
	<!--{if $_GET[view]=='me'}-->
	<input type="hidden" name="username" value="$space[username]" />
	<!--{/if}-->
	<input type="hidden" name="ac" value="album" />
</form>
</div>
<h2 class="title"><img src="image/app/album.gif">相册 - $album[albumname]</h2>
<div class="tabs_header">
	<ul class="tabs">
		<li class="active"><a href="space.php?uid=$pic[uid]&do=album&id=$pic[albumid]"><span>查看图片</span></a></li>
		<li><a href="space.php?uid=$space[uid]&do=album&id=$pic[albumid]"><span>返回列表</span></a></li>
		<li><a href="space.php?uid=$space[uid]&do=album&view=me"><span>返回我的相册</span></a></li>
		<li class="null"><a href="cp.php?ac=upload&albumid=$pic[albumid]">上传新图片</a></li>
	</ul>
</div>
<!--{else}-->
<!--{eval 
	$_TPL['spacetitle'] = "相册 - $album[albumname]";
	$_TPL['spacemenus'][] = "<a href=\"space.php?uid=$space[uid]&do=album&view=me\">查看全部相册</a>";
	$_TPL['spacemenus'][] = "<a href=\"space.php?uid=$space[uid]&do=album&id=$pic[albumid]\">返回图片列表</a>";
}-->
<!--{template space_menu}-->
<!--{/if}-->

<div class="h_status">
	<div class="r_option">
		
		<a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=up">上一张</a><span class="pipe">|</span>
		<a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=down" id="nextlink">下一张</a><span class="pipe">|</span>
		<!--{if $_GET['play']}-->
		<a href="javascript:;" id="playid" onclick="playNextPic(false);">停止播放</a>
		<!--{else}-->
		<a href="javascript:;" id="playid" onclick="playNextPic(true);">幻灯播放</a>
		<!--{/if}--><span id="displayNum"></span><span class="pipe">|</span>
		<!--{if $_SGLOBAL[supe_uid] == $album[uid] || checkperm('managealbum')}--><a href="cp.php?ac=common&op=manage&idtype=picid&id=$pic[picid]" id="a_manage" onclick="ajaxmenu(event, this.id, 99999)">管理</a><span class="pipe">|</span><!--{/if}-->
		<a href="cp.php?ac=common&op=report&idtype=picid&id=$pic[picid]" id="a_report" onclick="ajaxmenu(event, this.id, 99999,'' , -1)">举报</a>
	</div>
	<!--{if $album[picnum]}-->当前第 $sequence 张<span class="pipe">|</span>共 $album[picnum] 张图片<!--{/if}-->&nbsp;
	<!--{if $album['friend']}-->
	<span class="locked gray">
	<!--{if $album['friend'] == 1}-->仅好友可见<!--{/if}-->
	<!--{if $album['friend'] == 2}-->指定好友可见<!--{/if}-->
	<!--{if $album['friend'] == 3}-->仅自己可见<!--{/if}-->
	<!--{if $album['friend'] == 4}-->凭密码可见<!--{/if}-->
	</span>
	<!--{/if}-->
</div>


<div class="photobox">
	<a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=down"><img src="$pic[pic]" /></a>
	<p>$pic[title]</p>
	<a href="cp.php?ac=share&type=pic&id=$pic[picid]" id="a_share_$pic[picid]" class="a_share" onclick="ajaxmenu(event, this.id, 99999,'' , -1)" class="a_share">分享</a>
	<p>上传于 <!--{date('Y-m-d H:i',$pic[dateline])}--> ($pic[size])</p>
	<!--{if isset($_GET['exif'])}-->
	<!--{if $exifs}-->
	<!--{loop $exifs $key $value}-->
	<!--{if $value}--><p>$key : $value</p><!--{/if}-->
	<!--{/loop}-->
	<!--{else}-->
		<p>无EXIF信息</p>
	<!--{/if}-->
	<!--{/if}-->
	<!--{if $pic[uid]==$_SGLOBAL[supe_uid]}--><p><a href="javascript:;" onclick="update_title();">更新图片说明</a></p><!--{/if}-->
	<div id="title_form" style="display:none;text-align:left;">
		<form id="titleform" name="titleform" action="cp.php?ac=album&op=editpic&subop=update&albumid=$pic[albumid]" method="post">
			<textarea name="title[{$pic[picid]}]" cols="70" rows="3" style="width: 380px">$pic[title]</textarea>
			<br><input type="submit" name="editpicsubmit" class="submit" value="更新">
			<input type="hidden" name="refer" value="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]">
			<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		</form>
	</div>
</div>

		
<div style="padding-top:20px; width:100%; overflow:hidden;">
	<div class="photocomment">	
		<div class="comments_list" id="comment">
			<!--{if $cid}-->
			<div class="notice">
				当前只显示与你操作相关的单个评论，<a href="space.php?uid=$pic[uid]&do=album&picid=$pic[picid]#comment">点击此处查看全部评论</a>
			</div>
			<!--{/if}-->
		
			<ul id="comment_ul">
			<!--{loop $list $value}-->
				<!--{template space_comment_li}-->
			<!--{/loop}-->
			</ul>
		</div>
		<div class="page">$multi</div>
		<form id="quickcommentform_{$picid}" name="quickcommentform_{$picid}" action="cp.php?ac=comment" method="post" class="quickpost" style="padding-bottom: 1em;">
			<table cellpadding="0" cellspacing="0">
				<tr>
					<td>
						<a href="###" id="comment_face" onclick="showFace(this.id, 'comment_message');"><img src="image/facelist.gif" align="absmiddle" /></a><br>
						<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="5" cols="60" style="width: 380px;"></textarea>
					</td>
				</tr>
				<tr>
					<td>
					<input type="hidden" name="refer" value="space.php?uid=$pic[uid]&do=$do&picid=$pic[picid]" />
					<input type="hidden" name="id" value="$picid">
					<input type="hidden" name="idtype" value="picid">
					<input type="hidden" name="commentsubmit" value="true">
					<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="评论" onclick="ajaxpost('quickcommentform_{$picid}', 'comment_status', 'comment_add')" />
					<span id="comment_status"></span>
					</td>
				</tr>
			</table>
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		</form>
	</div>
	
	<div class="photobar">
		<div class="cat">
			<ul>
				<li><a href="$pic[pic]" target="_blank">新窗口查看原图</a></li>
				<li><a href="javascript:;" onclick="javascript:setCopy('$pic_url');return false;">复制图片地址</a></li>
			<!--{if !isset($_GET['exif'])}-->
				<li><a href="space.php?uid=$pic[uid]&do=$do&picid=$pic[picid]&exif">显示图片EXIF信息</a></li>
			<!--{/if}-->
			<!--{if $pic[uid]==$_SGLOBAL[supe_uid]}-->
				<li><a href="cp.php?ac=album&op=editpic&albumid=$pic[albumid]&picid=$pic[picid]">编辑图片</a></li>
			<!--{/if}-->		
			</ul>
		</div>
	</div>
</div>


<script type="text/javascript">
<!--
	var interval = 5000;
	var timerId = -1;
	var derId = -1;
	var replay = false;
	var num = 0;
	var endPlay = false;
	function forward() {
		window.location.href = 'space.php?uid=$pic[uid]&do=album&picid=$pic[picid]&goto=down&play=1';
	}
	function derivativeNum() {
		num++;
		$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
	}
	function playNextPic(stat) {
		if(stat || replay) {
			derId = window.setInterval('derivativeNum();', 1000);
			$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
			$('playid').innerHTML = '停止播放';
			timerId = window.setInterval('forward();', interval);
		} else {
			replay = true;
			num = 0;
			if(endPlay) {
				$('playid').innerHTML = '重新播放';
			} else {
				$('playid').innerHTML = '幻灯播放';
			}
			$('displayNum').innerHTML = '';
			window.clearInterval(timerId);
			window.clearInterval(derId);
		}
	}
	<!--{if $_GET['play']}-->
	<!--{if $sequence && $album['picnum']}-->
	if($sequence == $album[picnum]) {
		endPlay = true;
		playNextPic(false);
	} else {
		playNextPic(true);
	}
	<!--{else}-->
	playNextPic(true);
	<!--{/if}-->
	<!--{/if}-->
	
	function update_title() {
		$('title_form').style.display='';
	}
//-->
</script>

	
<!--{template footer}-->